<?php

namespace App\VO\UserOrder;

use App\VO\AListBaseVO;
use App\VO\UserOrder\MetaInfo\OrderListInfo;
use App\VO\UserOrder\MetaInfo\UserOrderSearchInfo;

class UserOrderIndexVO extends AListBaseVO
{
    /**
     * @var UserOrderSearchInfo
     */
    public $search;

    /**
     * @var OrderListInfo[]
     */
    public $orders = [];

    /**
     * @param UserOrderSearchInfo $search
     */
    public function setSearch(UserOrderSearchInfo $search): void
    {
        $this->search = $search;
    }

    /**
     * @param OrderListInfo $info
     */
    public function addOrder(OrderListInfo $info)
    {
        $this->orders[] = $info;
        $this->count++;
    }
}
